<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<script th:inline="javascript">
$(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
/*<![CDATA[*/
$(function() {
    battcn.admin.menu[[${OP.menuId}]].save = function(obj) {
  		if($("#menu[[${OP.menuId}]]Form").valid()){
	  		battcn.ajaxJson({url:"/op_save_[[${OP.menuId}]]",data:$('#menu[[${OP.menuId}]]Form').serializeArray()},function(){
	  			battcn.closeWindow();
				battcn.reloadDiv('/op_list_[[${OP.menuId}]]');
    		});
  		}
	}
});
battcn.admin.menu[[${OP.menuId}]].imgs = function (){
 		battcn.showWindow({
		title:'使用规则',
		type:2,
		href:'http://www.zi-han.net/theme/hplus/fontawesome.html?v=4.0#contao',
		width : '45%',
		height : '65%',
		okhandler:function(){
			battcn.closeWindow();
		},
		cancelhandler:function(){
			battcn.closeWindow();
		}
	});
 	}
/*]]>*/

</script>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<form class="form-horizontal m-t required-validate" th:id="@{menu{menuId}Form(menuId=${OP.menuId})}">
			<input type="hidden" name="id" th:value="${dto?.id}" />
			<div class="form-group">
				<label class="col-sm-3 control-label">部门名称：</label>
				<div class="col-sm-8">
					<input name="name" class="form-control" th:value="${dto?.name}"
						validate="{required:true,messages:{required:'请填写部门名称'}}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">上级部门：</label>
				<div class="col-sm-8">
					<select class="form-control m-b" name="paterId">
						<option value="">请选择部门</option>
						<option th:each="m : ${menus}" th:value="${m?.id}" th:selected="${m.id == dto?.paterId}" th:text="${m.name}"></option>
					</select>
				</div>
			</div>
			<div class="form-group" th:if="${dto!=null}">
				<label class="col-sm-3 control-label">部门负责人：</label>
				<div class="col-sm-8">
					<select class="form-control m-b" name="user">
						<option value="">请选择负责人</option>
						<option th:each="m : ${userList}" th:value="${m?.id}" th:selected="${m.id == dto?.user}" th:text="${m.name}"></option>
					</select>
				</div>
			</div>
			<!--<div class="form-group">-->
				<!--<label class="col-sm-3 control-label">图标：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input name="icon" class="form-control"	th:value="${dto?.icon}"-->
						<!--validate="{required:true,messages:{required:'请填写icon'}}"/>-->
					<!--<span class="help-block m-b-none"> -->
						<!--<i class="fa fa-info-circle"></i> <a th:onclick="@{battcn.admin.menu{menuId}.imgs()(menuId=${OP.menuId})}">点我查看使用规则</a></span>-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">-->
				<!--<label class="col-sm-3 control-label">目录：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input name="channel" class="form-control"-->
						<!--th:value="${dto?.channel}"	validate="{required:true,messages:{required:'请填写目录'}}"/>-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">-->
				<!--<label class="col-sm-3 control-label">参数：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input name="param" class="form-control" type="text"-->
						<!--th:value="${dto?.param}"/>-->
				<!--</div>-->
			<!--</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">排序：</label>
				<div class="col-sm-8">
					<input name="ordno" class="form-control" th:value="${dto?.ordno}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8">
					<div class="radio i-checks radio-inline">
						<label><input type="radio" value="1" th:checked="${dto?.locked}" name="locked" /><i></i> 启动 </label>
					</div>
					<div class="radio i-checks radio-inline">
						<label><input type="radio" value="0" th:checked="${dto?.locked != true}" name="locked" /><i></i> 禁用 </label>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="ccomment" name="remark" cols="55" rows="3"
						class="form-control" th:text="${dto?.remark}"></textarea>
				</div>
			</div>
		</form>
	</div>
</div>


</html>